<template>
    <div>
        <van-form @submit="onSubmit">
            <van-field v-model="phone" name="phone" label="手机号" placeholder="手机号" :rules="[{ required: true, message: '请填写phone' }]" />
            <van-field v-model="code" type="text" name="code" label="验证码" placeholder="验证码" :rules="[{ required: true, message: '请填写验证码' }]" />
            <div style="margin: 16px;">
                <van-button round block type="info" native-type="submit">登录</van-button>
            </div>

        </van-form>
        <transition name="van-slide-up">
            <div v-show="visible">
                <div style="width: 2rem; height: 2rem; background-color: aqua; color: #000;">
你真注册啊？？？？？？？？
                </div>
            </div>
        </transition>
        <van-button style="width: 2rem;border-radius: 40%;" @click="jump" type="warning">暂不登录</van-button>

    </div>
</template>

<script>
export default {
    data() {
        return {
            phone: "",
            code: "",
            visible:false,
            timer:''
        };
    },
    methods: {
        onSubmit() {
            // console.log("submit", values);
            this.visible=true
            this.timer=setTimeout(function (params) {
                this.visible=false
                console.log(this.visible);
            },3000)
        },
        jump() {
            this.$router.push("/");
        },
    },
    destroyed() {
        this.timer=null
    },
};
</script>

<style>
</style>